package com.finance.capacity.siteMonth.capService;

import com.finance.capacity.siteMonth.bean.pojo.SiteMonthDetail;
import com.finance.capacity.siteMonth.bean.pojo.SiteMonthList;
import com.finance.capacity.siteMonth.bean.pojo.SiteMonthPageList;
import com.finance.capacity.siteMonth.capDao.SiteMonthMapper;
import com.finance.framework.lang.Page;
import com.finance.framework.lang.PageResultBO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @Author: ly
 * @Date: Created in 2017/8/24
 * @Description:
 */
@Service
public class SiteMonthService implements ISiteMonthService {
    @Autowired
    private SiteMonthMapper siteMonthMapper;
    @Override
    public PageResultBO<SiteMonthPageList> siteSummaryListByPage(Page page) {
        PageResultBO<SiteMonthPageList> pageResultBO = new PageResultBO<SiteMonthPageList>();
        List<SiteMonthPageList> siteMonthList = siteMonthMapper.siteSummaryListByPage(page);
        pageResultBO.setPageNo(page.getPageNo());
        pageResultBO.setPageSize(page.getPageSize());
        pageResultBO.setDataList(siteMonthList);
        pageResultBO.setTotalRecord(page.getTotalRecord());
        return pageResultBO;
    }
    @Override
    public List<SiteMonthDetail> siteSummaryDetail(SiteMonthList siteMonthList){
        List<SiteMonthDetail> siteMonthListDetail = siteMonthMapper.siteSummaryDetail(siteMonthList);
        return  siteMonthListDetail;
    }

    @Override
    public List<SiteMonthPageList> siteSummaryExport(SiteMonthList siteMonthList) {
        return siteMonthMapper.siteSummaryExport(siteMonthList);
    }
}



